<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>商品类型管理</title> <#include "/WEB-INF/content/module-index.html">
<script type="text/javascript">

function statusFormatter(value,rowData,rowIndex){
	if(value==0){
		return "正常";
	}else
		return "禁用";
}

function handleFormatter(value,rowData,rowIndex){
	return '<a href="javascript:uploadImg(\''+rowData.aid+'\')">下级区域</a>';
}

function uploadImg(objectid){
	top.openModule("<#if map.stage??><#if map.stage gt 1>base_nodetype-node<#else>base_area-nodetype</#if></#if>","<#if map.stage??>${map.stage+1}</#if>级区域","base/nodearea/"+objectid+"/index");
}
</script>
<style>
a.btn-border{
	border: 1px solid #ccc;
}
</style>
</head>
<body>
<body class="easyui-layout">
	<div region="center" style="padding: 5px; background:#eee;">
		<div id="toolbar">
			<@auth code="base:area:new">
				<a id="new" class="easyui-linkbutton" onclick="javascript:add();" icon="icon-add" style="border: 1px solid #ccc" plain="true">新增</a>
			</@auth>
			<@auth code="base:area:*:edit">
				<a id="edit" class="easyui-linkbutton" onclick="javascript:edit();" icon="icon-edit" style="border: 1px solid #ccc" plain="true">编辑</a>
			</@auth>
		</div>
		<table id="grid" class="easyui-datagrid" url="query" align="center" idField="aid" rownumbers="true" striped="true" fitColumns="true" fit="true" pagination="true" singleSelect="true" toolbar="#toolbar">
			<thead>
				<tr>
					<th field="name" width="50">区域名称</th>
					<#if map.stage??>
						<#if map.stage lt 4>
							<@auth code="base:nodearea:*:index">
							<th field="handle" width="50" formatter="handleFormatter" align="center">操作</th>
							</@auth>	
						</#if>						
					</#if>				
				</tr>
			</thead>
		</table>
	</div>
</body>
</body>

</html>